import { instance } from '@/utils/request'

export const getGoodsList = ({
  categoryId,
  goodsName,
  page,
  sortType,
  sortPrice
}) => {
  return instance.get('/goods/list', {
    params: {
      categoryId,
      goodsName,
      page,
      sortType,
      sortPrice
    }
  })
}

export const productDetail = ({ id }) => {
  return instance.get('/goods/detail', { params: { goodsId: id } })
}
export const getCommentList = ({ id, scoreType = -1 }) => {
  return instance.get('/comment/list', { params: { goodsId: id, scoreType } })
}
